<?php

App::uses('Category', 'Model');

$urlUsers = $this->Html->url(array('controller' => 'Users', 'action' => 'admin'));
$urlChangePass = $this->Html->url(array('controller' => 'Users', 'action' => 'changePassForm'));
$urlLogout = $this->Html->url(array('controller' => 'Sesion', 'action' => 'logout'));
$urlMH = $this->Html->url(array('controller' => 'Teams', 'action' => 'index'));
$urlPP = $this->Html->url(array('controller' => 'Passports', 'action' => 'index'));
$urlVP = $this->Html->url(array('controller' => 'Checker', 'action' => 'index'));
$urlScheduler = $this->Html->url(array('controller' => 'TestScheduler', 'action' => 'admin'));
$urlQuestions = $this->Html->url(array('controller' => 'Questions', 'action' => 'admin', '0'));
$urlRegisteredTrainments = $this->Html->url(array('controller' => 'TestRegister', 'action' => 'registered'));
$name = $authUser['full_name'];
$nom = $authUser['nomina'];
?>
<ul class="nav navbar-nav navbar-left">
    <li>
        <a href="<?php echo $this->Html->url('/'); ?>">
            Entrena<span class="kaushan">Te!</span>
        </a>
    </li>
    <li>
        <a href="<?php echo $urlUsers; ?>">
            <i class='fa fa-users'></i>
            <?php echo __('Usuarios'); ?>
        </a>
    </li>
    <li>
        <a href="<?php echo $urlMH; ?>">
            <a href="menuSupervisor.ctp"></a>
            <i class='fa fa-list'></i>
            <?php echo __('Matriz Visual de Habilidad'); ?>
        </a>
    </li>
    <li>
        <a href="<?php echo $urlPP; ?>">
            <i class='fa fa-print'></i>
            <?php echo __('Pasapporte'); ?>
        </a>
    </li>
    <li>
        <a href="<?php echo $urlVP; ?>">
            <i class='fa fa-qrcode'></i>
            <?php echo __('Verificador'); ?>
        </a>
    </li>
    <li class="dropdown">
        <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown">
            <i class='fa fa-list'></i>
            <?php echo __('Cursos'); ?>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
            <li>
                <a href="<?php echo $urlQuestions; ?>">
                    <i class='fa fa-question'></i>
                    <?php echo __('eEvaluación de certificación'); ?>
                </a>
            </li>
            <li>
                <a href="<?php echo $urlScheduler; ?>">
                    <i class='fa fa-calendar'></i>
                    <?php echo __('Agendar cursos'); ?>
                </a>
            </li>
        </ul>
    </li>
    <li>
        <a href="<?php echo $urlRegisteredTrainments; ?>">
            <i class='fa fa-list-alt'></i>
            <?php echo __('Registros a cursos'); ?>
        </a>
    </li>
</ul>
<ul class="nav navbar-nav navbar-right">
    <li class="dropdown">
        <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown" title="<?php echo $name; ?>">
            <?php echo $this->Html->image('workers/' . $nom . '.jpg', array('height' => '30px')); ?>
            <?php echo $nom; ?>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
            <li>
                <a href="<?php echo $urlChangePass; ?>">
                    <i class='fa fa-edit'></i>
                    <?php echo __('Cambiar contraseña'); ?>
                </a>
            </li>
            <li>
                <a href="<?php echo $urlLogout; ?>">
                    <i class='fa fa-sign-out'></i>
                    <?php echo __('Cerrar sesión'); ?>
                </a>
            </li>
        </ul>
    </li>
</ul>
